import constantRoutes from '@/router';
const state = {
  routes: [constantRoutes], // 静态+权限路由
  accessRoutes: [] // 当前用户的权限路由
};

const mutations = {
  updateRoutes: (state, data) => {
    state.accessRoutes = data;
    state.routes = state.routes.concat(data);
  }
};

export default {
  namespaced: true,
  state,
  mutations
};
